{% extends "tj3/tj3.html" %}


{% block content  %} 
<h2>Journals</h2>
<form action="." method="post" enctype="multipart/form-data">
{{ select_project }}
<input type="submit" name="command" value="Select" class="button" />
</form>
{% for booking, j_list in journals %}
<h4>{{ booking }}</h4>
<ul>
	{% for jj in j_list %}
	{% for j in jj %}
		<li>
	{% if j.alert == "green" %}
		<img src="/media/icons/alert_green.png" alt="" height=20px 
		width=20px />
	{% endif %}
	{% if j.alert == "yellow" %}
		<img src="/media/icons/alert_yellow.png" alt="" height=20px 
		width=20px />
	{% endif %}
	{% if j.alert == "red" %}
		<img src="/media/icons/alert_red.png" alt="" height=20px 
		width=20px />
	{% endif %}
	<a href={% url journal_edit j.id %}>{{j.summary}}</a>:
	<ul>
		<li>Task: <a href={% url task_detail j.booking.task.id %}>{{j.booking.task}}</a>
		<li>Resource: {{j.booking.resource}}
		<li>Description: {{j.description}}
		<li>Memo: {{j.memo}}
	</ul>
	{% endfor %}
	{% endfor %}
</ul>
{% endfor %}

<h2>Journal tables</h2>
<table>
<thead>
<th>CREATED<th>ALERT<th>BOOKING<th>SUMMARY<th>DESCRIPTION<th>MEMO
</thead>
<tbody>
{% for booking, j_list in journals %}
{% for jj in j_list %}
{% for j in jj %}
<tr>
	<td>{{j.created}}
	<td>
	{% if j.alert == "green" %}
		<img src="/media/icons/alert_green.png" alt="" height=20px 
		width=20px />
	{% endif %}
	{% if j.alert == "yellow" %}
		<img src="/media/icons/alert_yellow.png" alt="" height=20px 
		width=20px />
	{% endif %}
	{% if j.alert == "red" %}
		<img src="/media/icons/alert_red.png" alt="" height=20px 
		width=20px />
	{% endif %}
	
	<td>{{booking}}
	<td><a href={% url journal_edit j.id %}>{{j.summary}}</a>
	<td>{{j.description}}
	<td>{{j.memo}}
</tr>
{% endfor %}
{% endfor %}
{% endfor %}
</tbody>
</table>


 {% endblock content %}
